//存放路由逻辑

const fs = require('fs')
 
module.exports = function(routeEvent){

    routeEvent.on('./index',function(req,res){
        console.log("触发了index事件");
        let data = fs.readFileSync('./views/index.html')
        res.write(data)
        res.end()
    })

    routeEvent.on('./product',function(req,res){
        console.log("触发了index事件");
        let data = fs.readFileSync('./views/product.html')
        res.write(data)
        res.end()
    })
    routeEvent.on('./users',function(req,res){
        console.log("触发了index事件");
        let data = fs.readFileSync('./views/users.html')
        res.write(data)
        res.end()
    })
}